package com.qf.mxapp.controller;


import com.qf.mxapp.pojo.Activities;
import com.qf.mxapp.result.ApiStatus;
import com.qf.mxapp.result.ResponseData;
import com.qf.mxapp.service.ActivityService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import java.util.List;

@RestController
@RequestMapping("activites")
public class ActivityController {

    @Resource
    private ActivityService activityService;

    @GetMapping("/")
    public ResponseData<List>queryActivities(){
        List<Activities> activitiesList = activityService.queryAll();
        return new ResponseData<>(ApiStatus.SUCCESS,activitiesList);
    }

}
